// 定义公共请求方法
function vankehttps(params) {
    if (!params.type) {
        params.type = 'GET'
    }
    $.ajax({
        type: params.type,
        url: params.url,
        data: params.data,
        dataType: 'json',
        success: function (res) {
            // var data=JSON.parse(res);
            if(res.errCode==0){
                params.dcallback && params.dcallback(res);
            }else if(res.errCode==-1){
                loading.hide();
                toast.hide();
                dialogBtn.setContent(res.msg);
                dialogBtn.setOperate('确定',function () {
                    dialogBtn.hide();
                });
                dialogBtn.show();
            }else if(res.errCode==4404){
                loading.hide();
                toast.hide();
                dialogBtn.setContent(res.msg);
                dialogBtn.setOperate('确定',function () {
                    window.location.href='http://vkwechat.mebaby.cn/app/index.php?i=2&c=entry&do=spacelist&m=orange_spacerental&wxref=mp.weixin.qq.com';
                });
                dialogBtn.show();
            }
        },
        fail: function (res) {
            console.log(res);
        },
        cancel: function (res) {
            console.log(res);
        }
    })
}